package Primary;

public class ThreadJoin {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            for (int i = 1; i <=10 ; i++) {
                System.out.print(i+" ");
            }
        });
        Thread t2 = new Thread(() -> {
            for (int i = 1; i <=10 ; i++) {
                System.out.print(i+" ");
            }
        });
        t1.start();
        t1.join();
        System.out.println();
        System.out.println("t1线程打印完毕");
        t2.start();
        t2.join();
    }
}
